# #### Configuration
# Base options
TEMPLATE = app
LANGUAGE = C++
unix:!macx:CONFIG -= qt
macx:QT += opengl
CONFIG -= app_bundle

# Executable name
TARGET = visualizer

# the dir where vcglib and anttweakbar are
BASELIBS_DIR = ..

# Directories
DESTDIR = .
OBJECTS_DIR = build/
mac:DEFINES += MACOS
QMAKE_CXXFLAGS += -frounding-math

# #### libs
# GLEW
macx:INCLUDEPATH += /Library/Frameworks/glew.framework/Headers/
unix:!macx:LIBS += -lGLEW
macx:LIBS += -framework \
    GLEW

# GLUT
macx:INCLUDEPATH += /System/Library/Frameworks/GLUT.framework/Headers/
unix:!macx:LIBS += -lglut -lGLU
macx:LIBS += -framework \
    GLUT

# AntTweakBar
unix:!macx:INCLUDEPATH += $${BASELIBS_DIR}/AntTweakBar/include/
macx:INCLUDEPATH += /Library/Frameworks/AntTweakBar.framework/Headers/
unix:!macx:LIBS += -L$${BASELIBS_DIR}/AntTweakBar/lib \
    -lAntTweakBar
macx:LIBS += -framework \
    AntTweakBar

# vcgib
INCLUDEPATH += $${BASELIBS_DIR}/vcglib/
SOURCES += $${BASELIBS_DIR}/vcglib/wrap/ply/plylib.cpp \
#    ../../myProject/AG/vertex.cpp \
    Cluster.cpp \
    ../../myProject/AG/SpatialIndex.cpp \
    ../../myProject/AG/DataStructure.cpp
SOURCES += $${BASELIBS_DIR}/vcglib/wrap/gui/trackball.cpp
SOURCES += $${BASELIBS_DIR}/vcglib/wrap/gui/trackmode.cpp

# CGAL
macx:INCLUDEPATH += /opt/local/include/
macx:LIBS += -L/opt/local/lib
macx:LIBS += -lCGAL_CORE
unix:!macx:LIBS += -lCGAL_Core
LIBS += -lCGAL \
    -lCGAL_PDB \
    -lCGAL_ImageIO \
    -lgmpxx \
    -lgmp

# ##### platform dependent hacks
# Awful problem with windows..
win32:DEFINES += NOMINMAX

# ##### headers and sources
# Input
HEADERS += glut_trackball.h \
    ../../myProject/AG/Cluster.h \
    ../../myProject/AG/SpatialIndex.h \
    ../../myProject/AG/DataStructure.h
HEADERS += htimer.h
HEADERS += ringWalker.h
HEADERS += minSphere.h
SOURCES += minSphere.cpp
HEADERS += mymesh.h
SOURCES += mymesh.cpp
HEADERS += expand.h
SOURCES += expand.cpp
HEADERS += visualizer.h
SOURCES += visualizer.cpp
SOURCES += main.cpp
